//package com.plian.system.controller.fr.budgetfeedback;
//
//import com.plian.Tools.FileTools;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.system.annotation.Behavioral;
//import com.plian.system.entity.fr.budgetfeedback.FullBudgetFeedbackMatters;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.fr.budgetfeedback.IFullBudgetFeedbackMattersService;
//import com.plian.system.vo.fr.budgetfeedback.FullBudgetFeedbackMattersVO;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiResponse;
//import io.swagger.annotations.ApiResponses;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.core.io.FileSystemResource;
//import org.springframework.http.ResponseEntity;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletResponse;
//import java.util.List;
//
///**
// * 全面预算备案(国资)
// *
// * @author jiatp
// * @create 2023-02-08
// **/
//@RestController
//@RequestMapping(value = "api/budget_feedback_matters")
//public class FullBudgetFeedbackMattersController extends BaseController {
//
//    @Resource
//    private IFullBudgetFeedbackMattersService fullBudgetFeedbackMattersService;
//
//    /**
//     * 新增修改  国资
//     *
//     * @param budgetFeedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @ApiOperation(value = "新增修改", notes = "新增修改")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "操作失败"),
//    })
//    @PostMapping("/submit")
//    public R submit(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) {
//        return fullBudgetFeedbackMattersService.submit(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 查询详情
//     */
//    @ApiOperation(value = "查询详情", notes = "查询详情")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @PostMapping("/detail")
//    @Behavioral
//    public R detail(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) throws Exception {
//        return fullBudgetFeedbackMattersService.detail(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 列表分页
//     */
//    @ApiOperation(value = "列表分页", notes = "列表分页")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @PostMapping("/list")
//    public ListResult listPage(@RequestBody Query query) {
//        return fullBudgetFeedbackMattersService.listPage(query);
//    }
//
//    /**
//     * 保存/保存并下发(汇总)
//     *
//     * @param budgetFeedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @ApiOperation(value = "保存/保存并下发/汇总", notes = "保存/保存并下发/汇总")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "操作失败"),
//    })
//    @PostMapping("/saveSend")
//    public R saveSend(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) {
//        return fullBudgetFeedbackMattersService.saveSend(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 企业保存(上报页面)
//     *
//     * @param budgetFeedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @ApiOperation(value = "企业保存上报", notes = "企业保存上报")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "操作失败"),
//    })
//    @PostMapping("/saveEnterpriseSend")
//    public R saveEnterpriseSend(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) {
//        return fullBudgetFeedbackMattersService.saveEnterpriseSend(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 企业上报
//     *
//     * @param budgetFeedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @ApiOperation(value = "企业上报", notes = "企业上报")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "操作失败"),
//    })
//    @PostMapping("/enterpriseSend")
//    public R enterpriseSend(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) {
//        return fullBudgetFeedbackMattersService.enterpriseSend(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 下发
//     *
//     * @param budgetFeedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @ApiOperation(value = "下发", notes = "下发")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 1999, message = "操作失败"),
//    })
//    @PostMapping("/deliveryMatters")
//    public R delivery(@RequestBody FullBudgetFeedbackMattersVO budgetFeedbackMattersVO) {
//        return fullBudgetFeedbackMattersService.deliveryMatters(budgetFeedbackMattersVO);
//    }
//
//    /**
//     * 备案表导出【废弃】
//     *
//     * @param feedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @PostMapping("/buildword")
//    @ApiOperation(value = "下载doc", notes = "传入 investmentPlanRecord")
//    public void exportWord(@RequestBody FullBudgetFeedbackMattersVO feedbackMattersVO, HttpServletResponse response) {
//        fullBudgetFeedbackMattersService.exportWord(feedbackMattersVO, response);
//    }
//
//    /**
//     * 备案表预览
//     *
//     * @param feedbackMattersVO
//     * @return com.plian.system.model.R
//     **/
//    @PostMapping("/previewPdf")
//    @ApiOperation(value = "下载doc", notes = "传入 investmentPlanRecord")
//    public ResponseEntity<FileSystemResource> previewPdf(@RequestBody FullBudgetFeedbackMattersVO feedbackMattersVO) {
//        return FileTools.exportPdf(fullBudgetFeedbackMattersService.previewPdf(feedbackMattersVO));
//    }
//
//    /**
//     * 备案表下载到服务器
//     * 生成备案表
//     *
//     * @param
//     * @return com.plian.system.model.R
//     **/
//    @PostMapping("/createFile")
//    @ApiOperation(value = "下载doc", notes = "传入 investmentPlanRecord")
//    public void createFile(@RequestBody FullBudgetFeedbackMatters matters) {
//        fullBudgetFeedbackMattersService.downPdf(matters);
//    }
//
//
//    /**
//     * 删除
//     */
//    @ApiOperation(value = "删除", notes = "删除")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @Transactional(rollbackFor = Throwable.class)
//    @PostMapping("/remove")
//    public R remove(@RequestBody FullBudgetFeedbackMattersVO mattersVO) {
//        List<Long> ids = mattersVO.getIds();
//        return R.status(fullBudgetFeedbackMattersService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))));
//    }
//
//}
